linuxfandomcom-20200213-history
Linux explained to the Windows user
Intended audience: Windows users interested in switching to Linux, and new Linux users recently switched from using Windows. What Is Linux? Linux is technically an operating system kernel (like Darwin for OSX and NT for Windows) for the "GNU operating system". The entire operating system is called GNU/Linux. Many user space internal components were initially produced by the Free Software Foundation and historically, main developer of the Linux kernel, Linus Torvalds, offered his kernel as a basis for this operating system. Thus Linus' kernel and GNU's user space tools were primarily geared to work together. However, for the reasons of simplicity; because Linux is usually (but not always) paired with the GNU toolchain anyway; and because some felt little sense in such a long name, some people started to refer to the whole operating system simply as "Linux". Thus "Linux" may refer to a class of operating systems, and also to the "Linux" kernel itself. Packaging, maintaining and distributing Linux operating system along with various different software is called a 'distribution', and distributions may pick their own name that sometimes omit 'Linux' or 'GNU/Linux' completely from the title. For example: OpenSuse, Ubuntu, Debian GNU/Linux, Calculate Linux. What Differentiates Linux Operating System? Linux differs from Windows in a number of ways: *Linux is Free Software under General Public License version 2 (GPL 2). This means users are given right to distribute, use, modify and sell Linux freely - in source or binary form, and these rights are persistent and can't be stripped away. This may not be the case for programs that are distributed along with Linux OS on a distribution medium, but usually they are either Free Software too, or are under some permissive Open Source License. Linux is thus distinct from both Windows and OSX that are proprietary software. N.B. In this context, Free Software is not always gratis, though it often (usually) is. To use the common metaphor, Linux is necessarily free as in speech, but not as in free beer. *In common with OSX and the BSDs, Linux is a UNIX-like operating system. But Linux also has a tendency to prefer performance and fitness for the goal over its principles, thus it may break the UNIX approach, if it considers it to be lacking, limiting or unfit (most prominent example being 'systemd' - but so does MacOSX, see 'launchd') in any area. This is known to cause controversy and opposition of some degree, because it affects crossplaform compatibility (primarily with BSD and Solaris clones) within certain application fields (data centers, server farms). Other people think that Linux is a class of its own, and should not follow the train by adhering to common rules, but be free to create its own and lead it. Regardless, its free software - there are no limitations or restrictions when it comes to changing and adaptation. *Linux is much more configurable and flexible compared to Windows. In Windows, the user can only change settings that developers allow. In a Linux, due to source code availability and presence of automation to build the software, users can change nearly everything. Additionally, the software itself tends to be more flexible on Linux, instead of being geared towards the use cases that developers have intended for it to follow. Various Desktop Environments or Window Managers, for example, are much simpler to change in Linux, and have many more available options. The negative side of this approach however, is that bugs and problems which may arise or uncover on different configurations are by order of magnitude more - which, however, gives possibility to iron them out. Linux Is A Joined Effort The most distinguishing trait of Linux is its decentralized development process. No single entity makes or runs Linux. The Linux kernel, the core of the operating system, is developed and maintained by Linus Torvalds' Linux Foundation, often called 'vanilla kernel'. But various improvements and modifications are created by many organizations and individuals all over the world, some paid for by donations and some completely voluntary, that very often submit their changes back to Linus for review. Each Linux Distribution has it own development cycle, which is separate from the kernel development. In addition to this, the Desktop Environments and Window Managers are developed by yet other groups. This contrasts with the Microsoft way of doing things, where one company develops the whole OS: kernel, desktop environment, and much of the pre-installed software. Typical 'Linux' Consists of Many Projects Linux is really just the kernel and the drivers packed with the kernel. However, in order to put it to some use, a lot of programs from different projects ('Software') is used. For example, Xorg from Xorg Foundation, XFCE, KDE from KDE eV, GNOME from GNOME Project and so on. Distributions Just putting various pieces together does not make the operating system run. One needs to choose exact components for the task (server, desktop, gaming rig, thin client, cloud installation, workstation), correctly install and configure them, use some sort of installation script, add a package management component to allow easily adding software and solving possible conflicts, provide bug tracker for users to report eventual problems and help resolve them, consider the way to distribute the compilation, as well as ways to maintain it over time. Thus, if you're looking to explore Linux, you need to find a 'distribution' that fits your goal. There are specialized websites that review and track status of various distributions (distrowatch.com as example). Most Linux Distributions include instructions on how to make a 'Live CD/USB', which allows you to boot your machine into Linux to try it without actually installing it or you can try running it inside a virtual machine, which is the preferred method for testing them out. When choosing a distro, it is advised to pick one with long history, high popularity, active community and importantly - one geared towards your technical level and goal. Practical Differences Between Linux And Other Operating Systems There aren't really any EXEs and DLLs in Linux Linux does not rely on filename extensions like DOS/Windows does. Whether a file is executable is decided by a special file attribute, called the 'execute bit'. If it is set, then the shell opens the file and looks for a 'magic sequence' at the start of the file. Binary files are of 'ELF' or a.out internal format. To find out which format the file has, one can use the 'file' utility. Libraries typically have .o or .so ending. '.o' stands for 'object' and refers to static library, comparable to '.lib' on Windows; where '.so' stands for 'shared object' and refers to dynamic library, comparable to '.dll' on Windows. Linux has own free implementation of the Windows API, called WINE. WINE is a layer that is capable to directly execute native compiled Windows '.exe', '.dll', '.lib' and so on. WINE is highly compatible, but should not be abused for overuse, due to security, lack of full integration into Linux environment and performance reasons. WINE strives for 'bug-to-bug' compatibility, thus its capable of executing Windows malware inside the Linux system. This is why native Linux applications are always to be preferred. Software is typically not installed via downloading and running a program Most forms of Linux have an awesome thing called a Package Manager. The package manager accesses a huge online database, called repository, of software in packaged form, called packages (either in compressed, binary form, or containing automatically processed installation instructions), which are written against your distribution and lists them. This is somehow similar to Steam from Valve, Windows Store for Windows, Apple Store for Mac, Google Play for Android and so on; although originally all these mimic the original concept of a typical Linux Repository. This approach itself originates back to 'ports' from BSD operating system, although heavily modified. Package managers differ in how much automation is done or possible. Additionally, depending on package manager, an individual package is either a compressed file with pre-compiled binaries or data - this is called binary approach; or a recipe that allows the package manager to automatically download needed source code, automatically configure, compile and insert it in your system - this is called source-based approach. Some package managers allow both ways, but these types usually don't implement all possibilities of both approaches at the same time, due to various technical and logical conflicts (compare emerge vs apt-source). Packages can also have individual dependencies (for example, any software package would require the kernel package to be installed) and be split into smaller packages (binary, data, optional parts, extensions) for sake of minimizing download size on next update. There are many advantages to using package managers over downloading software as an executable or binary (as you might do on Windows from the website of the developer). *The packages are usually tested to work with your distribution extensively. Since there are so many Linux distributions that possibly implement their own approach to configuration, file system layout, software (compilers, system libraries) choices, this could potentially otherwise become a problem. *Because the packages are 'signed' (hash number is calculated and compared) by testers, you can ensure that you are downloading what you think you are downloading. *The amount of duplicate components, such as duplicate libraries You do not download unneccessary libraries, which you already have installed on your system. In WIndows, there is no way for the developer to tell what libraries your system already uses, so they must package all that are necessary, leading to larger downloads, longer install times, and software bloat. *You can easily uninstall completely, or even revert back to an older version number. *Software updates are much easier for the system to manage. Linux loves scripting If you can do it with a mouse in Linux, there is probably a command that will do the same thing. That means you can automate a lot of things right off the bat. A considerable number of developers recognize this culture, and write command-line programs first. Then, they write a GUI with all of the pictures and buttons we know and love. The GUI simply converts your clicks into commands which are run in the background. However, while scripting is exceptionally powerful feature, it is also slower than compiled application, thus this aspect should not be left out of attention. Various source code converters and script compilers are available for Linux. Linux Terminology The different terminology used in the Linux world can be confusing for a new user. Do not forget, that Linux is simply different. Thus carrying over and applying old approaches usually does not lead to anything good. Nevertheless, these differences are widely documented. Should you have any question, there is very high chance of someone already asking such question - google is your friend. Some of the more common differences are: *'Folders' are referred to as Directories. *The administrator '''account for a Linux system is called the '''root account. *The command prompt in Windows is a piece of software (cmd.exe). Its look is called 'Terminal' '''or 'CLI' (command line interface) in Linux, and such programs are called ''''shell'. Examples of shells are: sh, bash, zsh, tsh etc. * Drives are referred to as Partitions (no C: , D: , E:). Actually, under Windows, 'C:', 'D:' etc are drive labels - recent versions of Windows started to enumerate devices in a way similar to Linux. *'My Computer' is simply a File Manager. Technially, in Windows My Computer is implemented via explorer(.exe) program. In Linux, various File managers are available (Thunar, Nautilus, Dolphin, Konqueror, Midnight commander etc). Devices and drive partitions are represented as files USB ports, hard drives, any detected partitions on those hard drives, temperature sensors, and most any other device is represented by a file and placed in the 'dev' directory. There are different approach to access the same device: via label, serial number, numerical position on controller, unique ID. Each of these approaches creates features that can turn out as advantages or disadvantages - strictly depending on a use case. Since devices are mapped as files, one can work with whole device as if its a file. One can just tell a program what port or hard drive to use, by simply pointing it to that file. Position-based approach (/dev/sda1, /dev/sda2 etc): naming follows very specific convention, 's' stands for 'sata' type bus devices, 'h' for IDE bus - where this drive is attached to; 'a' for first physical drive on controller, 'b' for second and so on; '1' for first partition, '2' for second and so on. Approach makes it easy to access device on running system, but changing drive position can produce problems if drive position is hardcoded anywhere. UniqueID-based approach (/dev/disk/by-uuid/9ae35c45-c420-43e0-bf40-1dbe3f68): the long number is given at filesystem creation time and can be changed. This approach makes it easy to locate partition regardless of disk position, but can produce problems if its not changed after cloning. Label-based approach (/dev/disk/by-label/''label''): label is similar to disk label. This is quite similar to UUID, but its given by user - where UUID is automatically given by software. Serial Number based approach(/dev/disk/by-id/''serial_number''): should the device implement hardware serial number, it is possible to address the device by it. Device must have serial number and should device be replaced with a different one, references to it must also be replaced. Mounting Any device or folder can be attached to another folder. One can bind almost any directory in Linux into another location - like different filesystem on the same drive, another drive, a network drive, or even a ZIP file. This is called 'mounting', it synonyms to words like 'attach', 'connect', 'link' - but refers to a very specific action: when mounting is performed, device is opened by a filesystem driver that reads its structure and can present its contents as files; that device is then linked with specified folder. Prior to device being usable, it must be mounted. Prior to removal, it must be unmounted. Without mounting, only RAW, direct access to device is possible. If you remove the device prior to unmounting, the logical structure of filesystem may be damaged. In Windows, you can see similar thing in Disk Management, where you can unmount any drive that is not in use; and you see similar thing when you add or remove USB drives. Everything revolves around the root directory The root directory (/) is the beginning of it all. All folders are 'leaves' of this tree. Some are created by kernel, some are attached drives, some are projections of hardware locations. Compared to Windows, Linux structure is much more flexible and powerful. But this power comes at price of a bit higher complexity. Root is basically your C: drive, when compared to Windows, but stuff is added to it - it is not permanently nailed to specific location on specific disk. Category:Tutorial Category:Long pages Category:Information